#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_075;

TEST_CASE("75. Sort Colors", "[075]") {
    SECTION("example 1") {
        std::vector nums{2,0,2,1,1,0};
        Solution().sortColors(nums);
        CHECK(nums == std::vector{0,0,1,1,2,2});
    }
    SECTION("example 2") {
        std::vector nums{2,0,1};
        Solution().sortColors(nums);
        CHECK(nums == std::vector{0,1,2});
    }
    SECTION("example 3") {
        std::vector nums{0};
        Solution().sortColors(nums);
        CHECK(nums == std::vector{0});
    }
    SECTION("example 4") {
        std::vector nums{1};
        Solution().sortColors(nums);
        CHECK(nums == std::vector{1});
    }
    SECTION("example 5") {
        std::vector nums{1,0,2,1,1,0};
        Solution().sortColors(nums);
        CHECK(nums == std::vector{0,0,1,1,1,2});
    }
}
